<template>
  <div class="basic-layout">
    <div class="nav-side">
      <!-- 系统LOGO -->
      <div class="logo">
        <img src="../assets/logo.png" alt="" />
        <span>Manager</span>
      </div>

      <!-- 导航菜单 : 强调一下,这个菜单后期是需要动态渲染的,而不是写死的,暂时我们先写死,后期要重构导航菜单 -->
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        background-color="#001529"
        text-color="#fff"
        active-text-color="#ffd04b"
      >
        <el-submenu index="1">
          <template slot="title">
            <i class="el-icon-setting"></i>
            <span>系统管理</span>
          </template>
          <el-menu-item index="1-1">用户管理</el-menu-item>
          <el-menu-item index="1-2">菜单管理</el-menu-item>
          <el-menu-item index="1-1">角色管理</el-menu-item>
          <el-menu-item index="1-2">部门管理</el-menu-item>
        </el-submenu>
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-s-promotion"></i>
            <span>部门管理</span>
          </template>
          <el-menu-item index="1-1">休假申请</el-menu-item>
          <el-menu-item index="1-2">待我审批</el-menu-item>
        </el-submenu>
      </el-menu>
    </div>
    <div class="content-right">
      <div class="nav-top">
        <div>左</div>
        <div>右</div>
      </div>
      <div class="wrapper">
        <div class="main-page">
          <p v-for="(item, index) in 100" :key="index">hello {{ index }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {};
  },
  components: {},
};
</script>

<style scoped lang="scss">
.basic-layout {
  position: relative;

  .nav-side {
    position: fixed;
    width: 200px;
    height: 100vh;
    background-color: #001529;
    color: #fff;
    overflow-y: auto;

    .logo {
      display: flex;
      align-items: center;
      font-size: 18px;
      height: 50px;
      img {
        margin: 0 16px;
        width: 32px;
        height: 32px;
      }
    }
  }

  .content-right {
    margin-left: 200px;

    .nav-top {
      height: 50px;
      background-color: #fff;
      padding: 0 20px;
      border-bottom: 1px solid #ddd;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: fixed;
      right: 0;
      left: 200px;
    }

    .wrapper {
      background: #eef0f3;
      height: 100%;
      // height : calc(100vh - 50px);
      padding: 20px;
      padding-top: 71px;
      .main-page {
        height: 100%;
        background: #fff;
      }
    }
  }
}
</style>
